package com.test.wxy;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author wuxiaoyong
 * @since 2022-11-27
 */
@TableName(value = "tt_user")
public class User extends Model {

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    private Integer age; //
    private String name; //
    private Integer sex; //

    private Long creatorId;
    private String creator;
    private Date createTime;

    private Long updatorId;
    private String updator;
    private Date updateTime;

    private Long companyId;
    private Integer deleteFlag;
    @Version
    private Integer version;

    // 重写这个方法，return当前类的主键
    @Override
    protected Serializable pkVal() {
        return id;
    }

    public Long getId() {
        return id;
    }

    public Integer getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public Integer getSex() {
        return sex;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public String getCreator() {
        return creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public Long getUpdatorId() {
        return updatorId;
    }

    public String getUpdator() {
        return updator;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public Integer getVersion() {
        return version;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdatorId(Long updatorId) {
        this.updatorId = updatorId;
    }

    public void setUpdator(String updator) {
        this.updator = updator;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
